package com.zhengjiang.lambda;

import java.util.Arrays;
import java.util.Comparator;
import java.util.function.IntToLongFunction;

/**
 * @author zhengjiang
 * @version 1.0.0
 * @description
 * @date 2021/5/30
 **/
public class LambdaArrays {

    public static void main(String[] args) {
        String[] arry1 = new String[]{"java","phython","android","ios"};
        System.out.println(Arrays.toString(arry1));

        Arrays.sort(arry1);
        System.out.println(Arrays.toString(arry1));

        Arrays.parallelSort(arry1, Comparator.comparingInt(String::length));
        System.out.println(Arrays.toString(arry1));

        int[] arry2 = new int[]{3,-4,25,16,30,18};
        Arrays.parallelPrefix(arry2,(left,right)-> left * right);
        System.out.println(Arrays.toString(arry2));

        long[] arry3 = new long[5];
        Arrays.parallelSetAll(arry3, o->5*o);
        System.out.println(Arrays.toString(arry3));


    }
}
